package com.maiji.cloud.entities.shopingmall;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.google.common.collect.Lists;
import com.maiji.cloud.entities.login.UserInfo;
import com.maiji.cloud.response.login.UserInfoResData;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@NoArgsConstructor
@Data
@Accessors(chain = true)
@TableName("distribution_log")
@Table(name = "distribution_log")
public class DistributionLogEntity {

    @TableId
	@Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
	private String uuId;

    @Column(name = "user_id", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String userId; //获取分销基金的用户id

	@Column(name = "order_id", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String orderId; //订单id
	
	@Column(name = "level", type = MySqlTypeConstant.INT, length = 2, defaultValue = "0")
	private Integer level; //用户等级 上级用户为：1，上上级用户：2
	
	@Column(name = "is_refund", type = MySqlTypeConstant.INT, length = 2, defaultValue = "0")
	private Integer isRefund; //0正常，1已退款完成
	
	@Column(name = "money", type = MySqlTypeConstant.DOUBLE, length = 8, decimalLength = 2)
	private Double money; //分销金额
	
	@Column(name = "in_time", type = MySqlTypeConstant.DATETIME)
	private Date inTime;

    @TableField(exist = false)
    private String nickName;

    @TableField(exist = false)
    private String orderNo;

    @TableField(exist = false)
    private ShopingOrder shopingOrder;

    @TableField(exist = false)
    private List<Date> inTimes = Lists.newArrayList();

    @TableField(exist = false)
    private UserInfo userInfo;

}
